package com.zh.demo.service.impl;

import com.zh.demo.entity.User;
import com.zh.demo.mapper.UserMapper;
import com.zh.demo.service.IUserService;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import org.springframework.stereotype.Service;

import java.time.LocalDate;
import java.time.LocalDateTime;
import java.util.Date;

/**
 * <p>
 *  服务实现类
 * </p>
 *
 * @author yufei
 * @since 2018-12-13
 */
@Service
public class UserServiceImpl extends ServiceImpl<UserMapper, User> implements IUserService {

	public void add(String name, String passward){
		User user = new User();
		user.setCompanyNo("-1");
		user.setGmtCreate(LocalDateTime.now());
		user.setGmtModify(LocalDateTime.now());
		user.setCreator("-1");
		user.setModifier("-1");
		user.setName(name);
		user.setPassward(passward);
		this.save(user);
	}

}
